Python: how how to divide elements of arrays based on condition

welcome to shbcf.ru